package test;

import cn.printer.Printer;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    @Test
    public void test1(){
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        Printer printer =(Printer)context.getBean("printer");
        printer.print("123333");
    }
    @Test
    public void test2(){
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        Printer printer =(Printer)context.getBean("printer2");
        printer.print("123333123333333");
    }
    @Test
    public void test3(){
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        Printer printer =(Printer)context.getBean("printer3");
        printer.print("123333123123123123123123123");
    }
}
